<?php

$config = [
    'defaultRoute' => 'route/api',
    'bootstrap' => [
        'contentNegotiator' => [
            'class' => 'yii\filters\ContentNegotiator',
            'formats' => [
                'application/json' => 'json',
                'application/xml' => 'xml',
            ],
            'languages' => [
                'zh-CN',
                'en',
            ],
        ]
    ],
    "components" => [
        'errorHandler' => [
            'class'=>'common\components\fast_api\ErrorHandler',
        ],
        'fastApi' => [
            'class' => 'common\components\fast_api\FastApi',
        ],
        "request" => [
            'class' => '\yii\web\Request',
            'enableCookieValidation' => false,
        ],
        "user" => [
            "class" => 'adminApi\rewrites\User',
            "identityClass" => 'adminApi\models\db\User',
            "enableAutoLogin" => true,
            "identityCookie" => ["name" => "_identity-" . APP_ID, "httpOnly" => true],
        ],
        "session" => [
            "name" => "session-" . APP_ID,
        ],
    ],
    'modules' => [
        'test' => 'adminApi\modules\test\TestModule',
    ],
    'params' => [],
];
return $config;
